Problem: $(\cos y+2)\dfrac{dy}{dx}=2x$ and $y(1)=0$. What is $x$ when $y=\pi$ ? $x=\pm$
Solution: The differential equation is separable. What does it look like after we separate the variables? $(\cos y+2)\,dy=2x\,dx$ Let's integrate both sides of the equation. $\int (\cos y+2)\,dy=\int 2x\,dx$ What do we get? $\sin y+2y=x^2+C$ What value of $C$ satisfies the initial condition $y(1)=0$ ? Let's substitute $x=1$ and $y=0$ into the equation and solve for $C$. $\begin{aligned} \sin 0+2\cdot0&=1^2+C\\ \\ 0&=1+C\\ \\ C&=-1 \end{aligned}$ Now use this value of $C$ to find $x$ when $y=\pi$. $\begin{aligned} \sin \pi+2\pi&=x^2-1\\ \\ 2\pi&=x^2-1\\ \\ x^2&=2\pi+1\\ \\ x&=\pm\sqrt{2\pi+1} \end{aligned}$